<template>
  <div class="M-Ranking">
    <div class="ran-left">
      <h3>{{ ranLists.name }}</h3>
      <p v-for="(item, index) in ranLists.tracks" :key="index">
        <span> {{ index + 1 }}. {{ item.first }}  </span
        ><b>  - {{ item.second }} </b>
      </p>
      <!-- <p>
        <span>{{ ranLists.two }} </span><b> {{ ranLists.twosinger }} </b>
      </p>
      <p>
        <span>{{ ranLists.three }} </span><b> {{ ranLists.threesinger }} </b>
      </p> -->
    </div>
    <div class="ran-right">
      <img :src="ranLists.coverImgUrl" alt="" />
      <div class="fre">
        <i class="iconfont icon-bofang1"></i><span> {{ get }} </span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    ranLists: Object,
  },
  computed: {
    get() {
      let nums = (this.ranLists.playCount / 10000).toFixed(1) + "万";
      // let nums = this.ranLists.name;
      return nums;
    },
  },
};
</script>

<style lang="scss" scoped>
.M-Ranking {
  width: 100%;
  height: 466px;
  border-radius: 20px;
  background: #f2f2f2;
  display: flex;
  justify-content: space-between;
  margin: 33px 0;
  position: relative;
  .ran-left {
    width: 100%;
    height: 466px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 10px;
    h3 {
      font-weight: 500;
    }
    p {
      font-size: 33px;
      margin-top: 5px;
      display: flex;
      width: 850px;
      span {
        // width: 533px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      b {
        //   width: 300px;
        color: #797979;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
  }
  .ran-right {
    //   width: 120px;
    img {
      width: 446px;
      height: 446px;
      border-radius: 0 33px 33px 0;
      
    }
    .fre {
      text-align: center;
      font-size: 12px;
      position: absolute;
      top: 370px;
      right: 0px;
      color: #fff;
      background: #080b0d;
      border-radius: 13px;
      padding: 0 13px;
      opacity: 0.7;
      z-index: 99;
      i {
        font-size: 12px;
      }
    }
  }
}
</style>